Skip to main content

Common files

Files in the /common folder are identical in both the centurionV2-workers and centurionV2-nodes repos. There are other solutions which may or may not be better to share these files between repos such as a mono-repo, git submodules, or repo sync actions. Until one of these solutions is implemented use the best practice section below when making changes to these files.

Files

  • alerts.js: provides functions to interact with Opsgenie
  • gmtTimestamp.js: converts javascript timestamps to human readable date and/or time strings
  • loki.js: provides functions to interact with Grafana's Loki logs
  • postgres-pool.js: provides the Postgres connection pool and transactional clients for database access

Changes: best practice

Changes to any one file must be made in the other. Only files that are considered shared code should be in the /commonfolder. Like files in each repo must remain exactly the same.

It is suggested to only change files in centurionV2-workers repo until you are satisfied it is operating correctly, then move a copy to centurionV2-nodejs. Run both projects in development for a full test. Lastly push both to GitHub.